<style type="text/css">
.h2 {
    color: #666;
    font: 18px/22px Arial, Helvetica, sans-serif;
}
.process-version {
    padding-left: 20px;
    background: transparent url(../images/version-16.png) no-repeat 0 0;
    line-height: 18px;
    white-space: nowrap;
}
.deployment-deploy-time {
    line-height: 18px;
    white-space: nowrap;
    color: #A2A1A1;
}
</style>
<script type="text/javascript">
    $(function(){
        var modelId = ${bpmnModel.id!''};
        $("#editModel").click(function(){
            if(modelId && modelId != null)
                navTab.openTab("editModel", "${rc.getContextPath()}/manage/service/editor?id="+modelId+"&userLanguage"+userLanguage, { title:"编辑模型", fresh:false,external:true, data:{} });
            // alertMsg.info("编辑");
        });
        
    })
    
    $(".activity-attr").click(function(){
        var activitId = $(this).attr("activitId");
        var taskType = $(this).attr("taskType");
        if(taskType){
            if( taskType == "userTask"){
                $.pdialog.open(hostUrl+"/flowNode/grantFlowNodeUser?modelId=${bpmnModel.id!''}&activitId="+activitId, "grantFlowNodeUser", "配置信息", {width: 800, height: 560, mask: true});
            }else if(taskType == "startEvent"){
                $.pdialog.open(hostUrl+"/flowNode/grantFlowNodeUser?modelId=${bpmnModel.id!''}&activitId="+activitId, "grantFlowNodeUser", "配置信息", {width: 420, height: 200, mask: true});
            }
        }
    });
</script>
<div class="accountInfo">
    <div style="width:50px;height: 50px;float:left;padding-top: 8px;">
        <img src="${rc.getContextPath()}/manage/images/process-50.png">
    </div>
    <div style="float:right;height: 50px; width:100%;margin-right:-62px;padding-top: 8px;">
        <div style="margin-left: 0px;height:27px">
            <div class="h2">${bpmnModel.name!''}（${bpmnModel.key!''}）</div>
        </div>
        <div style="margin-left: 0px; paddin-top:28px">
            <div style="float: left; margin-left: 0px;width:10px">
                <div class="process-version"><@label key='process_version.C'>模型版本</@label>${bpmnModel.revision!''}</div>
            </div>
        </div>
    </div>
</div>
<div class="panelBar">
    <ul class="toolBar">
        <@buttonRight menuCode="processModel_design" labelKey="edit.B" defalutName="编辑">
        <li><a class="edit" target="navTab" external="true" href="${rc.getContextPath()}/manage/service/editor?id=<#if bpmnModel??>${bpmnModel.id!''}</#if>&userLanguage=${(userLanguage!'')?if_exists}" title="<@label key='edit.B'>编辑</@label>"><span><@label key="edit.B">编辑</@label></span></a></li></@buttonRight>
        <@buttonRight menuCode="processModel_delete" labelKey="delete.B" defalutName="删除">
        <li><a class="delete" target="ajaxTodo" href="${rc.getContextPath()}/manage/model/deleteModel?navTabId=modelList&modelId=<#if bpmnModel??>${bpmnModel.id!''}</#if>" title="<@label key='delete_sure.D'>确定要删除</@label>？"><span><@label key="delete.B">删除</@label></span></a></li></@buttonRight>
        <@buttonRight menuCode="processModel_deploy" labelKey="deploy_model.B" defalutName="发布模型">
        <li><a class="edit"  target="ajaxTodo" href="${rc.getContextPath()}/manage/model/deploy?navTabId=modelList&modelId=<#if bpmnModel??>${bpmnModel.id!''}</#if>" title="<@label key='deploy_sure.D'>确定要发布吗？</@label>"><span><@label key='deploy_model.B'>发布模型</@label></span></a></li></@buttonRight>
        <@buttonRight menuCode="processModel_export" labelKey="export_model.B" defalutName="导出模型">
        <li><a class="icon"  target="dwzExport" href="${rc.getContextPath()}/manage/model/exportModel?navTabId=modelList&modelId=<#if bpmnModel??>${bpmnModel.id!''}</#if>" title="<@label key='export_sure.D'>确定要导出这些记录吗？</@label>"><span><@label key='export_model.B'>导出模型</@label></span></a></li></@buttonRight>
        <li class="line">line</li>
    </ul>
</div>
<div class="accountInfo" layoutH="105" style="position: relative; overflow: auto;">
        <#if hasModelExtra?? && hasModelExtra>
            <img src="${rc.getContextPath()}/manage/model/getModelEditorSourceExtra?modelId=${bpmnModel.id!''}&v=${.now?string('yyyy-MM-dd HH:mm:ss')}" />
        <#else>
            <p><@label key='process_noimg.C'>此模型没有流程图</@label></p>
        </#if>
        <div id="processImageBorder">
            <#if nodeDto??>
                <#list nodeDto as node>
                    <div class="activity-attr" style="position:absolute;left:${node.x}px;top:${node.y}px;width:${node.width}px;height:${node.height}px;
                     background-color: black;opacity: 0;" activitId="${node.id!''}" taskType="${node.type!''}" nodeDesc="${node.name!''}" 
                     taskRole="" currentUser="">
                    </div>
                </#list>
            </#if>
        </div>
</div>